#include "MyLogger.h"


MyLogger::MyLogger()
{

}

void MyLogger::log(nvinfer1::ILogger::Severity severity, const char *msg)
{

    std::string header="INFO: ";
    switch (severity) {
    case Severity::kINTERNAL_ERROR:
        header="INTERNAL_ERROR: ";
        break;
    case Severity::kERROR:
        header="ERROR: ";
        break;
    case Severity::kWARNING:
        header="WARNING: ";
        break;
    case Severity::kVERBOSE:
        header="VERBOSE: ";
        break;
    case Severity::kINFO:
    default:
        break;
    }

    std::cout<<header<<msg<<std::endl;
}

void MyLogger::log(const char *msg)
{
    log(Severity::kINFO, msg);
}
